System for adapting an automatic screw machine to achieve computer numeric control

ABSTRACT

A system for adapting existing conventional screw machines to be capable of computer numerical control operation. The system incorporates the use of a VersaCam device which replaces the turret cam of a single spindle screw machine. The VersaCam system monitors the motion of the screw machine camshaft and actuates the turret slide in synchronization with the camshaft. The VersaCam system also provides a means of specifying the desired turret slide trajectory for any given job.

This a continuation of U.S. patent application Ser. No. 09/064,417,filed Apr. 22, 1998, now U.S. Pat. No. 6,205,372, which is acontinuation of U.S. patent application Ser. No. 08/494,154, filed Jun.23, 1995, now U.S. Pat. No. 5,808,893. U.S. patent application Ser. No.08/494,154 is a continuation of U.S. patent application Ser. No.08/098,959, filed Jul. 28, 1993, now abandoned.

BACKGROUND AND SUMMARY OF THE INVENTION

The present invention relates generally to automatic screw machines, andmore particularly, to a system for adapting screw machines into computernumeric control (“CNC”) operated machines by incorporating a uniqueVersaCam device in place of a conventional hard cam.

Conventional automatic screw machines have been known for some time.These machines have a high capability for producing a large number ofidentical parts. When small quantities are required, however, the timeand expense to produce the special control cams necessary for operationof the machine, makes the use of a conventional automatic screw machineless desirable.

One of the operational functions of the screw machine is the movement ofthe machine tool relative to the work piece, which is generallyaccomplished by longitudinal movement of a tool turret and lateralmovement of two or more cross slides. At least two cross slides areusually provided on a conventional screw machine. The cross slidestypically move lateral to the spindle of the machine. Other cross slidesmay be positioned at specified angles relative to the basic crossslides.

Other functions important to the machine include the indexing of thetool turret, the feedout of the stock, and the control of the spindlespeeds. In conventional, single-spindle automatic screw machines, thetimed sequence of the above functions is controlled mechanically throughcams, trip dogs, trip levers and cam followers, which result in theengagement of the conventional machine mechanisms through clutches,gears, and similar devices at the proper time. Such an arrangement ofmechanical devices is found in any conventional automatic screw machine.

A cam made for one job can often be used on other jobs, although anychange in machine speed or feed rate in any part of the sequence willresult in slowing down the entire job. The alternative is to make acomplete new set of cams specifically designed for the new job. Forthese and other known reasons it is desirable that some or all of theoperations of the automatic screw machine be controlled by a numericcontrol system. With a numerical control system, the machine functionscan be controlled through electrical signals by a software program, andthe requirements of each job can be programmed into the apparatus. Thereare newly made automatic screw machines which have this numericalcontrol capability. However, there are a vast number of existingautomatic screw machines of the conventional variety which do not havethis capability. Therefore, a system for retrofitting these conventionalmachines is needed.

Accordingly, a system for retrofitting a conventional automatic screwmachine to accept numerical control is provided by the presentinvention. The present invention may also be incorporated into newlymanufactured screw machines that do not have CNC capability. Aconventional automatic screw machine includes a plurality of mechanicaltiming means which operate through engaging means, such as clutches andgears, to connect a main driving means to various operating mechanismsof the machine. These mechanisms control the individual functions of themachine, for example, spindle speed, the indexing of the tool turret andthe feeding of stock through the spindle. Also, the movement of theturret slide, towards and away from the work piece, and the movement ofthe cross slides are controlled through cam means usually including acam and a camshaft, which are driven by drive shaft means which in turnis driven by the main driving means.

The VersaCam system of the present invention is a versatile replacementfor the turret cam of a single-spindle screw machine. The VersaCam candrive the cam follower so as to mimic any possible cam profile. TheVersaCam is a CNC machine with a mechanical output that displaces thecam follower of a cam-logic machine. It comprises a mechanism to drive acam follower, an actuator to power this mechanism, a sensor to determinethe position of the mechanism, a control system which causes themechanism to follow a desired trajectory (as a function of cam driveshaft position), a means for specifying desired trajectory, and a sensorto determine the position of the cam drive shaft.

The VersaCam system of the present invention is not designed to replacethe mechanical timing of conventional machines but rather will use andwork with the mechanical timing found in conventional machines. Further,the VersaCam system does not require disconnecting the cross slides, butuses them as they are normally used in the operation of conventionalmachines. The VersaCam system depends on the position of the drivingcamshaft for its operation. The VersaCam system uses an electric driveand is designed to drive the turret without modification to the turret.

In another embodiment of the present invention the screw machine turretslide may be actuated directly, rather than through the cam follower. Alinear actuator may be provided, in direct contact with the turretslide, which actuator may be hydraulic, ball-screw based, or of othercommon hardware.

In addition to the novel features and advantages mentioned above, otherobjects and advantages of the present invention will be readily apparentfrom the following descriptions of the drawings and preferredembodiments.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a perspective view of a conventional screw machine retrofittedwith a preferred embodiment of the present invention;

FIG. 2 is a perspective view of a preferred embodiment of a VersaCamdevice of the present invention;

FIG. 3 is a cutaway view of a preferred embodiment of a VersaCam deviceof the present invention shown in connection with existing hardware of aconventional automatic screw machine; and

FIG. 4 is a diagram of a preferred embodiment of a software system whichmay be used in connection with a preferred embodiment of the presentinvention.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENT(S)

Referring now to the drawings, and particularly FIG. 1, there is showngenerally at reference numeral 10 a single-spindle automatic screwmachine. The machine 10 is shown in a retrofitted condition, by thepresent invention, to be operable as a computer numeric control machine.The present invention has been termed a VersaCam and is identified byreference numeral 12.

The VersaCam 12 is actually an electromechanical system with severalfunctional subsystems as shown in FIG. 4. Also shown in FIG. 1, anddescribed in greater detail hereinafter, is the operator interface unit14 of the present invention.

Referring now to FIG. 2, an enlarged partial perspective view is shownof the VersaCam 12 in association with cam follower 16 of a machine 10.

The VersaCam system of the present invention may be packaged in a singlehousing 18, which mounts to the cam drive shaft (in place of the hardcam) via rotary bearings. An adjustable restraining link 20 may positionthe housing in the desired orientation. The sensor 22 which measures thecam drive shaft 24 position may be a rotary optical incremental encoder,mounted to the VersaCam housing, and gear driven from the cam driveshaft. The mechanism which drives the cam follower 16 may be a linearwedge 26 (the cam wedge) which is moved inward and outward by means of aball-screw 28. The bottom of the cam wedge may ride on rollers. Theactuator 30 may be a conventional DC electric servo-motor with apulse-width-modulated servo-amplifier. The sensor 32 which determinesthe position of the mechanism may be a rotary optical incrementalencoder which is mounted to the back side of the servo-motor. Inaddition there may be a mechanical limit switch which is tripped whenthe cam wedge is in a certain position. This switch may be used todetermine the revolution number of the optical encoder. The controlsystem may be implemented on a microcontroller, microprocessor, and/ordigital signal processor chip, depending on computability speedrequirements. The desired trajectory profile and other parameters may bestored in local memory. The controller may incorporate a small keypadand an alpha-numeric display.

Desired trajectories may be specified by means of a software packagewhich preferably runs on personal computers. The operator may specify,in tabular format, the operations, positions, etc. for each tool insequence. The software may then calculate the detailed trajectorynecessary to implement the operations. The trajectory parameters may bedownloaded into the VersaCam controller via a serial communicationsport.

FIG. 3 illustrates in greater detail the physical mechanism of theconventional machine 10 and the VersaCam 12. Components shown in FIG. 3which are typically common to a conventional machine are a turret slidecushion 40, an adjusting screw 42 connected to the turret slide and aturret slide rack 44 which engages the teeth of the cam follower 16. Aconnecting rod 46, roll disk 48, and turret disk 50 are known to thoseof ordinary skill in the art.

In the boxed, dashed zone 52 of FIG. 3 another embodiment of the presentinvention is shown. The boxed zone depicts a direct linear drive unit 54which may be used in place of the wedge drive unit 12. These two units54, 12 would not be used together but as alternatives to each other. Thelinear actuator 54 could be hydraulic, ball-screw based, or othersimilar configuration.

The slider block, and the gear rack 44, to which the adjusting screw 42is attached can slide with respect to the main turret slide 36. Whenused normally, the load path is as follows:

the cam applies force to the lead lever 16;

the lead lever 16 applies force to the turret slide (gear) rack 44;

the gear rack applies force to the adjusting screw 42;

the adjusting screw applies force to the slider block 45;

the slider block applies force to the connecting rod 46;

the connecting rod applies force to the turret change roll disk 48; and

the turret change roll disk applies force to the turret slide 36. Whenthe tool turret is indexed, the turret change roll disk rotates throughone full revolution, and the connecting rod causes the relative positionbetween the slider block and the turret slide to change. If the turretslide is fully retracted, this results in the cam follower lifting offof the cam. If the turret slide is not retracted, the cam follower willstay on the cam and the turret slide will retract.

There are two approaches to using direct linear actuation. In the firstof these, the linear actuator may push, but not be attached to, theslider block (via the adjusting screw in the drawing). This permits themechanical tool-change retract mechanism to be used normally. The linearactuator cannot be attached to the slider block because, when the turretslide is fully retracted, the retract mechanism would fight the linearactuator, trying to pull it. The disadvantage of this approach is thatthe linear actuator, if based on a ball-screw, would require its ownlinear guideway system to support the ball-screw.

The second approach is to disable the mechanical retract mechanism andto use the servomotor to retract the turret slide during tool changes.The linear actuator could then be attached directly to any point on theturret slide, and the turret slide guideway would also serve as theguideway for a ball-screw. This approach has two disadvantages. First, areasonably-sized servomotor would be slower than the retract mechanism,therefore increasing part cycle times. (This apparently is a drawback ofsome retrofit systems currently on the market.) Second, the actualindexing of the tool turret would still be accomplished mechanically,and the relative timing between the mechanical (trip-dog) actuation andthe software turret retractions would be critical.

In order to achieve the functionality of a turret cam, the VersaCamsystem must monitor the motion of the screw-machine camshaft 24, and itmust actuate the turret slide 36 in precise synchronization with thecamshaft. In addition, since it is intended to replace all turret cams,the VersaCam system must provide a means of specifying the desiredturret slide trajectory for any given job.

The VersaCam system has many subsystems. In this document, a distinctionis drawn between functional subsystems and physical subsystems. Afunctional subsystem is defined by its inputs, outputs, and therelationship between them. A physical subsystem is the particularhardware and software chosen to implement a functional subsystem(s). Thefunctional subsystems and their interrelationships are of primaryimportance.

There are many possible variations of physical subsystems which could beemployed to produce the functionality of the VersaCam system.Furthermore, the physical subsystems of the VersaCam system do notnecessarily correspond directly to its functional subsystems. Functionalsubsystems may share physical subsystems. As an example of a sharedphysical subsystem, software components of all of the functionalsubsystems may execute on the same microprocessor within the VersaCamcontroller. A less-obvious example is the attachment of the VersaCammechanism to the camshaft: it provides a load path for the mechanism ofthe Turret Slide Actuation Subsystem, and, it provides a drive means forthe position sensor of the Camshaft Monitoring Subsystem.

As shown in FIG. 4, the VersaCam system may include the following fivemajor functional subsystems:

Turret Slide Trajectory Design Subsystem 80;

Camshaft Monitoring Subsystem 82;

Cam Simulator Subsystem 84;

Turret Slide Actuation Subsystem 86; and

Operator Interface Subsystem 88.

The Turret Slide Trajectory Design Subsystem 80 generates a time-basedturret slide trajectory on the basis of operator input 90.

The Camshaft Monitoring Subsystem 82 provides camshaft state 92(position, velocity, and acceleration) to the Cam Simulator Subsystem.

The Cam Simulator Subsystem 84 generates commanded turret slide states94 (position, velocity, and acceleration) in real time, based upon thenominal time-based trajectory and upon the actual camshaft state 92(position, velocity, and acceleration). It causes the turret slide tomaintain precise synchronization with the camshaft-driven mechanisms,regardless of perturbations in camshaft velocity.

The Turret Slide Actuation Subsystem 86 causes the turret slide tophysically track its commanded state (position, velocity, andacceleration). The Operator Interface Subsystem 88 provides the operatorwith the appropriate control of, and feedback from, all subsystems ofthe VersaCam system. All of the above functional subsystems aredescribed in detail hereinafter.

The Turret Slide Trajectory Design Subsystem 80 is a software systemwhich inputs high-level, operator-specified parameters 90 and produces acomplete set of detailed trajectory parameters which describe thedesired motion of the screw machine turret slide as a function of time.All time parameters are relative to the start of a machine cycle 95, andassume a constant machine cycle time (which implies a constant camshaftrotational velocity).

The portion of the Turret Slide Trajectory Design Subsystem whichpermits the screw machine operator to make precise tool offsetadjustments executes on the VersaCam controller. The remainder ofTrajectory Design Subsystem may also execute on the VersaCam controller.Alternatively, or in addition, it may execute on a stand-alone computersuch as an IBM PC. If the complete Trajectory Design Subsystem does notexecute on the VersaCam controller, the computed trajectory parametersmay be computed on a stand-alone computer and be transferred to theVersaCam controller prior to using the trajectory. If the software canexecute on both platforms, then it is also possible to specifyparameters on both platforms, either fully or partially.

The generation of optimal trajectories for the VersaCam is manageable iftool motion is first considered independently of machine timing. Ingeneral, tool motion requirements are a function of the particular tool,the piece being fabricated, the stock being used, and the spindle speed.Machine timing should be designed for compatibility with the toolmotion, not vice versa. Thus when a tool is cutting metal, or is notclear of the metal, the required tool motion dictates what the othermechanisms must or must not do. On the other hand, when the tool isclear of the workpiece, the other mechanisms may have priority (in whichcase the turret must simply stay clear of the action).

A screw machine turret, cam, and tool holders have so many possibleadjustments (degrees of freedom) that use of the machine (and theVersaCam in particular) will be greatly facilitated if some conventionsare adopted about how the redundant adjustments should be employed. Thefollowing suggested conventions are believed to be consistent withstandard screw machine practice, to be essentially optimal with respectto cycle time, and to provide a reasonably intuitive mapping betweenpart geometry and machine set-up.

In a departure from normal robot (and CNC machine tool) conventions,consider each tool to be independent (no explicit common tool orworkpiece coordinate system). Let each tool's maximum penetration intothe stock occur at the same (maximum) turret slide position, unlessturret slide travel is explicitly “cut down” for a given tool by thesetup man. (“Cut down” would be used for tools which are unusuallylong.)

The above approach has the following implications:

1. The “Stop” will be the shortest tool (and it implicitly establishesthe workpiece datum, which is the “stopped” surface of the stock). Anytool shorter than the stop could not reach the stock, much less cut it.

2. The length (radius installed in the tool turret) of any other tool,minus the length of the “stop”, determines that tool's maximumpenetration into the stock. (This should be both intuitive and familiarto setup men.)

3. The VersaCam system does not need to know anything explicit about theworkpiece dimensions (other that the depth of individual cuts), becausethey are determined by tool length adjustments (both mechanical andsoftware) alone.

4. The maximum excursion position of the turret can be established viasoftware at run-time, because the VersaCam kinematics are embedded inthe controller anyway. In general, however, the VersaCam wedge will befully extended at the maximum excursion position; this is equivalent tothe lobes of a hard cam extending to the maximum radius of the cam(which is the normal practice). The mechanical turret slide offsetadjustment can be used exactly as it is with a hard cam. Turret slideoffset adjustments (mechanical and/or software) would normally be usedto adjust the workpiece reference surface (that surface which hits thestop) relative to tools mounted to cross-slides (such as the cut-offtool).

5. The turret slide excursions are minimized (and cycle time optimized),because there is no turret slide motion required to compensate forunmatched tool lengths.

The following general approach may be used to generate optimal cycles:

1. Fully specify all metal cutting operations of the turret tools, theassociated turn-around operations, and any other required turret slidemotions. The computer can determine the total amount of time requiredfor such actions.

2. Specify tool changes as necessary between cutting actions. These can,in general, overlap turn-around operations. The computer can determinethe time (if any) which must be added to the turn-around operations inorder to allow for the tool change to complete.

3. Estimate the elapsed times required for independent cross-slidemotions (i.e. ones which cannot be performed simultaneously with turrettool cutting actions). These should be programmed as explicit dwells oras minimum turn-around durations (as described above for tool changes)in the turret slide trajectory.

4. Select a machine cycle time which is slightly greater than the sum ofall the above elapsed times.

5. Select cross-slide cams. Determine how many hundredths of motion areneeded for each independent cross-slide operation. If necessary, adjustthe corresponding dwell times or turn-around durations in the turretslide trajectory.

6. There will be, in general, some “slack” time (when the screw machineis doing nothing) at the beginning/end of the turret slide trajectorycycle. This is unavoidable, inasmuch as the available cycle times arediscrete quantities, and the first one slower than the optimal time isthe fastest cycle time that can be used. It is also desirable to havesome amount of slack time, however, because it provides a safety marginfor mix-estimation of cross-slide operation times, and permits theset-up man some flexibility in the installation of side-cams, etc.

The computer now has all the information necessary to compute optimalturret trajectories. The setup man now simply installs side cams, tripdogs, etc., at the appropriate positions in order to complete themachine setup.

As an alternative to the foregoing setup procedure for optimal cycles,the setup man can install the side cams, etc., where he sees fit,although he obviously cannot install them arbitrarily. In general, allhe really has the freedom to do is to install them at a “later” positionon the camshaft than is really necessary. Then, he can adjustturn-around durations and dwell times such that the computer agrees withhis placement of the side cams, etc. The computer can then compute theentire (sub-optimal) turret slide trajectory. If the set-up man has usedup more than the available amount of slack time, however, he will haveto change his mechanical setup or else use a slower cycle time.

A complete turret slide trajectory is made up of multiple motion“segments” which together span an entire machine cycle. The boundaryconditions of each segment are constrained such that the turret slideposition and velocity are continuous (no step changes) over the entiretrajectory. Note that a complete turret slide trajectory is cyclic, thusthe “first” segment is actually the successor of the “last” segment, andthe constraints on segment boundary conditions apply to this pair ofsegments also.

We have chosen to represent a trajectory segment by the coefficients ofthe polynomial X=P(t), where X 96 represents turret position and t 98represents the elapsed time since the start of the machine cycle, and bythe initial and final values of time for the segment. The final value oftime for a given segment is equivalent to the initial value of time forthe following segment. Equations for turret velocity and accelerationare obtained by differentiating the polynomial which describes eachsegment.

Second-order polynomials may be used to represent trajectory segments;this represents a good tradeoff between complexity, smoothness, andoverall performance. Thus the turret slide acceleration is constant forthe duration of a given segment. However, if it were desired to reducethe trajectory “jerk” (rate of change of acceleration), this could beaccomplished by fitting a higher order polynomial to each trajectorysegment while imposing the additional boundary value condition thatacceleration be continuous across segment boundaries. Even trajectory“jounce” (rate of change of jerk) can be limited in this manner, ifdesired.

An “operation” specifies a set of one or more trajectory segments. Giventhe set of operator-input parameters for a given operation, softwarealgorithms automatically compute all of the segment parameters for thesegments within that operation.

Five types of operations are: Feed-In, Dwell, Feed-Out, Turn-Around, andPosition. Note that the above operations cannot be used in an arbitrarysequence. Some of the operations fully or partially specify their ownboundary conditions, and some inherit some or all of their boundaryconditions from adjacent operations. The boundary condition constraintsare satisfied when the operations are used in their customary andintended sequences; otherwise, the system signals the operator that thetrajectory is “incomplete.”

The Feed-In operation is used for normal cutting operations in which theturret tooling is advancing into the feedstock. The Feed-In operationpreferably uses the following operator-specified parameters:

Initial position (millimeters or inches);

Feed-in rate (mm/spindle-rev or in/spindle-rev); and

Final Position (millimeters or inches). The initial velocity is equal tothe feed rate, and the final velocity is zero. Note that the initial andfinal position can be specified directly, or one can be specifieddirectly and the other specified indirectly via a feed distance, or“throw.”

The Dwell operation preferably causes the turret slide to remain in agiven position for a specific number of spindle revolutions. It is usedimmediately following a Feed-In operation. The Dwell operation uses thefollowing operator-specified parameter: Duration (spindle revolutions).The dwell position is equal to the final position of the operation whichprecedes it. The turret-slide velocity is zero throughout a Dwelloperation.

The Feed-Out operation is used for cutting operations in which theturret tooling is retracting out of the feedstock, such as when a tap isbeing unscrewed. The feed-out operation preferably has the followingoperator-specified parameters:

Feed-out rate (mm/spindle-rev or in/spindle-rev); and

Final Position (millimeters or inches).

The initial position is equal to the final position of the operationwhich precedes it. The initial velocity is zero, and the final velocityis equal to the feed-out rate. Note that the final position can bespecified directly, or it can be specified indirectly via a feeddistance, or “throw.”

The Turn-Around operation computes the time-optimal trajectory whichconnects adjacent operations. The Turn-Around operation automaticallyprovides the rapid out/in motions normally employed to get tools intocutting position in minimum time. The turn-around operation preferablyhas the following (optional) operator-specified parameters:

Minimum “clear” position (millimeters or inches); and

Minimum “clear” period (seconds, or hundredths of a cycle). The initialposition and velocity are equal to the final position and velocity ofthe operation which precedes it. The final position and velocity areequal to the initial position and velocity of the operation whichsucceeds it.

The optional operator-specified parameters provide a means by which theoperator can allow adequate time and clearance for tool indexoperations, cross-slide operations, etc. The minimum clear position isspecified such that, when the turret slide is retracted beyond theminimum clear position, there is no possibility of interference betweenthe turret tooling and any other devices on the screw machine. The clearperiod is the period for which the turret slide is retracted to orbeyond the minimum clear position. The default for the clear position isthe minimum possible retract distance, and the default for the clearperiod is zero.

The Position operation is used to precisely position the turret slide ina specified location for a specified duration. It differs from the Dwelloperation in two ways: it includes a pre-defined approach trajectory tothe specified position (this trajectory maximizes the positioningaccuracy), and its duration is not specified in terms of spindlerevolutions. One use of the Position operation is to position the turretslide for a feed-stop operation.

The Position operation preferably uses the following operator-specifiedparameters:

Final Position (millimeters or inches); and

Duration (seconds, or hundredths of a machine cycle).

The initial position is a function of the Final Position and of theapproach trajectory. The final velocity is zero. The initial velocity isa function of the approach trajectory.

The VersaCam trajectory design 80 provides a benefit which is notavailable using a conventional turret cam. Using a hard cam, there isnormally no efficient way to independently and precisely adjust theextension of the tools in the tool turret. The normal practice is toloosen the tool holders and tap the tools with a brass hammer, usingtrial and error to get within the part tolerance. The VersaCamtrajectory design, however, allows the operator to enter a precise tooloffset adjustment for a given tool into the VersaCam controller, usingthe controller's numeric keypad. The trajectory design Subsystem 80 thenmakes the appropriate offset adjustment to the turret slide trajectoryduring the period of time in which the given tool is being used.

The Camshaft Monitoring Subsystem 82 provides camshaft state 92(position, velocity, and acceleration) information to the other VersaCamfunctional subsystems. In general, all camshaft state variables can besensed, or else a subset of them can be sensed and the remainder of themestimated by a state observer. To minimize the cost of the sensorsystem, and because there is mechanical (rotational) noise on thecamshaft that is not desirable, it is preferred to directly measure theposition of the camshaft, and to use state observer/filter techniques toobtain accurate estimates of camshaft position, velocity, andacceleration.

The camshaft monitoring system thus preferably comprises two primarysubsystems: the Camshaft Position Sensor (including its electronicinterface), and Camshaft Observer Subsystem.

The Camshaft Position Sensor is a position transducer which measures theangle of the turret camshaft relative to the machine frame. Anincremental optical encoder, with a 1024 counts per revolutionquadrature output and an index channel, may be used. The encoder may bedriven in a 1:1 ratio by the camshaft relative to the machine frame.Associated with the encoder is an electronic circuit which receives thequadrature signal and converts it to a binary count of 4096 counts perrevolution. This circuit interfaces to a microprocessor in the VersaCamcontroller. The electrical power to the encoder, and to its associatedelectronics, may be supplied by a battery in the event of an AC powerfailure; this prevents the absolute position information from being lost(which would require a re-registration procedure to be performed).

The Camshaft Observer Subsystem is a software system which processes thesignal from the Camshaft Position Sensor, produces a better estimate ofcamshaft position than can be obtained by the sensor alone, and providesvelocity and acceleration information as well. The raw sensor output hasseveral deficiencies: (1) it does not provide the velocity or theacceleration of the camshaft, (2) it contains discretization noise, and(3) the camshaft is subject to backlash to which the turret slide shouldnot respond to (but which the sensor measures).

The camshaft of a screw machine is driven with respect to the spindlevia a gear train which exhibits backlash. At certain times, cross-slidereturn springs may, via the cross-slide cams, suddenly back-drive thecamshaft through this backlash region. In such situations the spindledoes not undergo any acceleration, thus we do not wish the turret slideto undergo any acceleration. If the turret slide were to track thetransformed camshaft acceleration, it could result in a tool beingaccelerated rapidly into the stock during a cutting operation, possiblybreaking a tool or ruining the part being machined.

The Camshaft Observer Subsystem may include a P-I filter which producespseudo-continuous (as opposed to discretized) acceleration, velocity,and position outputs. The error between the observed position and themeasured position is used to force the observed position to track themeasured position. The output of the P-I filter is input to a 2nd-order,state-variable, low-pass filter, which further reduces discretizationnoise.

In addition to reducing discretization noise and providing accelerationand velocity outputs, the Camshaft Observer Subsystem can detect theposition errors characteristic of the camshaft backlash phenomenon. Tominimize the effect of this phenomenon on the filter output, the gainsof both filter stages are changed when backlash is detected. Thisgain-scheduling algorithm increases the time constant of both filterstages for the duration of the backlash phenomenon, resulting in theobserved camshaft position, velocity, and acceleration being largelyunaffected by the backlash phenomenon.

The camshaft serves as a mechanical transmission which powers oractivates various mechanisms on the screw machine, causing one part tobe made during each full revolution of the camshaft. For our purposes,the important attribute of the camshaft is that it controls the machine,it establishes the relationship between the operations of the variousdevices, and it controls the rate at which the various operationsprogress. Thus we use the term “machine cycle,” or simply “cycle,”synonymously with “one full revolution of the camshaft.”

The time-based trajectory which is generated by the Turret SlideTrajectory Design Subsystem is computed assuming that the camshaft speedis a known, constant value. In general, however, this is not preciselytrue (especially when the machine is starting and stopping). Since theturret slide must be precisely synchronized with the other mechanismsthat are driven from the camshaft, the turret slide trajectory should bemade to conform to the actual camshaft speed. Because a physical camdoes precisely synchronize its output drive with the camshaft,regardless of camshaft speed, the subsystem which performs thissynchronization function is termed the Cam Simulator Subsystem 84. Itpreferably has two primary components:

Time-Base to Cycle-Base Conversion Subsystem; and

Cycle-Base to Time-Base Conversion Subsystem.

Since the camshaft angle, rather than time, is the independent variablethat controls turret slide position, velocity, etc., the first thingdone by the Cam Simulator Subsystem 84 is to convert time-basedtrajectory parameters to cycle-based parameters. This can be done toeach of the segment parameters, the complete set of which completelydescribes the entire trajectory. In this manner, the entire trajectorycan be converted off-line, prior to actual trajectory execution.Alternatively, individual turret-slide states (position, velocity, andacceleration) can be converted as they are used during trajectoryexecution.

Trajectory parameters with units of time (seconds) are converted tounits of “cycles” by dividing by the nominal machine-cycle period(seconds/cycle). Parameters with units of position (meters) do notrequire conversion. Parameters with units of velocity (meters/second)are converted to units of meters/cycle by multiplying by the nominalcycle period (seconds/cycle). Parameters with units of acceleration(meters/second²) are converted to units of (meters/cycle²) bymultiplying by the square of the nominal cycle period (seconds/cycle).

During trajectory execution, the actual camshaft state 92 (position incycles, velocity in cycles/second, and acceleration in cycles/second²)is used, together with the desired cycle-based turret-slide state 100(position in meters, velocity in meters/cycle, and acceleration inmeters/cycle2), to determine the desired time-based turret-slide state(position in meters, velocity in meters/second, and acceleration inmeters/second²). The turret-slide position requires no conversion. Toobtain the corrected turret velocity (meters/second), the cycle-basedturret velocity (meters/cycle) is multiplied by the actual camshaftvelocity (cycles/second). To obtain the corrected turret acceleration(meters/second²), the camshaft velocity and acceleration are combinedwith the cycle-based turret velocity and acceleration as follows:

(meters/second²)=(meters/cycle²)*(cycles/second)²+(meters/cycle)*(cycles/second²)

The Turret Slide Actuation Subsystem 86 provides a means by which thescrew machine turret slide can be made to move in the desired manner. Itpreferably has two major functional subsystems:

Controlled Actuator; and

Transmission System.

The Controlled Actuator Subsystem is a motor system which can followmotion commands to the appropriate level of accuracy. The TransmissionSystem connects the Controlled Actuator to the screw machine turretslide mechanically, and also provides software functions which describethe relationship between the Controlled Actuator and the turret slide.These functional subsystems are described in greater detail hereinafter.

The Controlled Actuator Subsystem preferably includes all of thefunctional subsystems necessary to provide a mechanical motion outputwhich tracks a commanded motion input. These functional subsystemsinclude:

Motor;

Motor Feedback System;

Motor Amplifier; and

Feedback Control Law.

A brush-type electric DC servomotor may be chosen for the VersaCamsystem. Alternative motor types which could be used include brushless DCservomotors, electric stepper motors, and hydraulic motors. Theparticular motor selected can operate at the voltage levels obtained bysimply rectifying and filtering, for example, the 205 VAC, 3-phase powerused to operate a typical conventional screw machine; this eliminatesthe need for a bulky and expensive power transformer or for separateelectrical service to the VersaCam system.

In controlling a DC servomotor, useful feedback parameters include:motor position, motor velocity, motor acceleration, motor current, andmotor output torque. However, knowing only the motor position and themotor current, it is possible to obtain very good estimates of motorvelocity, motor acceleration, and motor output torque which permitnear-optimal control of the motor. Thus in order to minimize sensorcosts, it is advantageous to directly sense only motor position andmotor current.

The motor state feedback system preferably includes the followingprimary functional subsystems:

Motor Position Feedback Subsystem;

Motor Current Feedback Subsystem; and

Motor State Observer Subsystem.

A motor position sensor may be mounted directly to the motor shaft. Onepreferred sensor is an incremental optical encoder, with a 1024 countsper revolution quadrature output and an index channel. Associated withthe encoder is an electronic circuit which inputs the quadrature signaland converts it to a binary count of 4096 counts per revolution. Thiscircuit interfaces to a microprocessor in the VersaCam controller. Theelectrical power to the encoder, and to its associated electronics, maybe supplied by a battery in the event of an AC power failure; thisprevents the absolute position information from being lost (which wouldrequire a re-registration procedure to be performed).

Because the particular design selected for the Turret Slide ActuationSubsystem requires that the motor make multiple revolutions in order tomove the turret slide through its full range of motion, theonce-per-revolution index pulse provided by the motor encoder does notestablish an absolute motor position. For this reason, the TransmissionSystem provides a “home position” output when the mechanicaltransmission is at a particular location. This output enables the MotorFeedback Subsystem to determine the absolute revolution number of themotor. A software component of the Motor Feedback Subsystem converts theencoder count information, the encoder index pulse information, and theTransmission System “home position” information into an absolute motorshaft angle.

Motor current may be sensed by connecting a low-ohmage resistor inseries with the motor, and then measuring the voltage drop across thisresistor. Alternatively, devices may be used which measure the magnitudeof the motor current by measuring the strength of the magnetic fieldproduced by the current.

The basis of the Motor State Observer Subsystem is a dynamic motorsimulation, which is based on a mathematical model of the motor. Theinputs to the motor simulation may be the motor current and the motorshaft (output) torque. The outputs of the simulation may be motoracceleration, velocity, and position.

Since the current of the physical motor is measured and is thus known,it is used as the current input for the simulated motor. The motor shafttorque is not directly known, and is the remaining input to thesimulated motor through which the simulated motor can be controlled.

The position output of the simulated motor is compared to the measuredposition of the physical motor. The resulting error is used to generatean observed motor shaft torque, via a feedback control law, which isused as the torque input to the simulated motor. The feedback controllaw forces the position of the simulated motor to track the position ofthe physical motor. Thus, within the limitations of the accuracy of themathematical motor model and the bandwidth of the observer feedbackloop, the observer acceleration, velocity, and motor shaft torque arealso equal to those of the physical motor.

The function of a motor amplifier is to produce a high-power output,which can directly power a motor, as specified by a low-power controlinput. For the brush-type DC servomotor used in the VersaCam system, thebasic amplifier should produce a short-term average voltage across themotor terminals which is specified by a low-power control input.

A four-quadrant PWM (Pulse-Width Modulation) type amplifier may be usedon the basis of its good energy efficiency, low heat generation, andcompact size. A PWM amplifier rapidly switches the voltage across themotor terminals between the full supply voltage and zero volts. Theaverage voltage is controlled by varying the ratio of the time that thetwo different voltages are applied.

The preferred amplifier design operates off of a DC voltage supply ofapproximately 300V. This voltage supply is normally provided byrectifying and filtering the 205 VAC 3-phase power used to operate thescrew machine.

In the event of a power failure, the screw machine will not stopimmediately (unless it is declutched) but will instead coast to a stop.In order to prevent damage to tooling during this coastdown period, itis desirable for the VersaCam Turret Actuation Subsystem to continueactuating the turret slide in synchronization with the camshaft. Thiscan be made possible by connecting a battery system (preferably 300 V)to the amplifier power inputs. This battery system need only supply theamplifier with current during the brief coastdown period. It can berecharged automatically when AC power is recovered.

The Actuated Motor is caused to track its commanded position, velocity,and acceleration by means of a two-stage feedback control law. Theoutput of the feedback control law is a motor voltage command to themotor amplifier. The inputs to the feedback control law are the outputsof the Motor State Observer Subsystem (observed motor position,velocity, acceleration, and output torque), and the commanded motorstate. The two stages of the control law are:

Motor Acceleration Control Law; and

Motor Current Control Law.

The first stage of the feedback control law is a simple state-spacecontrol law that is used to calculate the desired acceleration of themotor, given the commanded and observed motor state variables. Then,using a standard mathematical model of the motor, the motor currentrequired to produce the desired motor acceleration is computedalgebraically. This desired motor current is used as the input to theMotor Current Control Law.

The Motor Current Control Law is used to force the actual motor currentto track the desired motor current. The inputs to this control law arethe desired motor current and the measured motor current, the output isthe motor voltage command to the motor amplifier. Because of the highbandwidth requirements of the current control system, the currentcontrol law is preferably implemented using electronic hardware ratherthan software.

The Transmission System provides the interface, both mechanical andcomputational, between the Controlled Actuator and the screw machineturret slide. It comprises three primary functional subsystems:

Transmission Mechanism;

Kinematics Mathematical Relationships; and

Transmission Position Feedback.

The primary function of the Transmission Mechanism is to provide amechanical transmission between the Controlled Actuator and thescrew-machine turret slide. One of the simplest possible mechanismdesigns would be a direct ball-screw drive between the motor and theturret slide. However, any such direct linear drive system would requireextensive modifications to the screw machine in order to provide for themechanical attachment of the drive system. Thus the turret slide maypreferably be actuated via the stock turret-cam follower; that is, thestock turret-cam follower is used as a component of the VersaCamTransmission Mechanism.

Having made the decision to actuate the turret slide via the camfollower, there is a multitude of possible mechanisms which couldsuccessfully interface between the Controlled Actuator and the camfollower. Examples of such mechanisms include:

Spiral-shaped rotary cam actuation;

Wedge-shaped linear cam actuation; and

Pinned lever actuation.

The prototype Transmission Mechanism makes use of wedge-shaped linearcam actuation. This mechanism uses a ball-screw to convert the rotarymotion of the Controlled Actuator to linear motion of a wedge-shapedlinear cam. When the linear cam is fully retracted, the turret slidereturn spring pushes the turret slide, and thus turret-cam follower, toits minimum position. As the linear cam is extended, its wedge shapepushes the cam follower, and thus the turret slide, toward its maximumposition.

A pinned-lever actuation system is another attractive mechanismalternative. This mechanism makes use of a lever on which the roller ofthe cam follower rides. The lever is pinned at a fixed position on oneside of the roller. On the other side of the roller, a ball-screw (whichis at approximately a right angle to the lever) may be used to rotatethe lever through an appropriate angle about the pinned joint. As aresult of the rotation of the lever, the cam follower is moved throughits required range of motion.

Pinned-lever actuation has several advantages over wedge-shaped linearcam actuation. First, it makes use of rotary joints only, thus it doesnot require the expense of a linear guideway. Second, it is easier toseal the mechanism from oil, metal chips, etc. Third, (for the Brown &Sharpe 2G screw machine, at least) it can be packaged into a volumewhich is less likely to inconvenience people working in the vicinity ofthe machine.

Rotary cam actuation is, of the various alternatives discussed herein,the mechanism most similar to the normal cam actuation. Using thisscheme, a cam, which is preferably of a spiral shape is servo-actuatedso as to engage the cam follower. Thus any desired turret slide positioncan be achieved by rotating the cam to a corresponding angle.

The function of the Kinematics Mathematical Relationships is to computethe relationships between the position, velocity, and acceleration ofthe screw machine turret and the position, velocity, and acceleration ofthe Controlled Actuator. Obviously, the mathematical description isdependent upon the type of mechanism.

For a very simple mechanical transmission such as a direct ball-screwdrive, the Mathematical Relationships are straightforward: the motor,position, velocity, or acceleration is multiplied by a constant in orderto obtain the turret slide position, velocity, or acceleration.

If the turret cam is actuated via the cam-follower, using a non-linearmechanism, the kinematic equations of the VersaCam TransmissionMechanism are quite complex. However, polynomial curve-fittingtechniques may be used in order to make the Kinematics Mathematicalequations relatively simple. Only the polynomial approximations to thekinematic equations are embedded in the VersaCam system, thus thekinematic equations can be evaluated quickly by a microprocessor in theVersaCam controller.

To obtain polynomial approximations to the kinematic equations, theexact kinematic equation relating turret slide position to ControlledActuator position is first derived. That equation is then used togenerate a set of points (actuator position and turret slide position)which cover the entire range of motion of the system. That set of pointsis input into polynomial curve-fitting software which generates sets ofpolynomial coefficients for the equations X=P1(Phi) and Phi=P2(X) (whereX represents turret slide position and Phi represents ControlledActuator shaft angle). The order of polynomials P1 and P2 are chosen tobe as small as possible, yet still maintain the maximum curve-fit errorto within a specified tolerance.

The equations relating turret velocity and acceleration with actuatorvelocity and acceleration can be obtained by differentiating thekinematic equations relating the positions of the turret slide andactuator. Now having accurate polynomial representations of thepositional relationships, one may differentiate the polynomialapproximations, rather than laboriously differentiating the exactequations.

Because the VersaCam trajectory is initially specified in terms ofturret slide positions, velocities, and accelerations, the KinematicsMathematical Relationships Subsystem is used to compute thecorresponding Controlled Actuator positions, velocities, andaccelerations (which are then used as inputs to the ControlledActuator). Similarly, when the actual turret slide position is displayedto the operator, the kinematics software is used to calculate the turretslide position based upon the measured motor position.

To provide a means by which the VersaCam controller can determine theabsolute position of the VersaCam motor (the motor encoder itself cannotindicate the motor revolution number), a position-sensing device hasbeen incorporated into the Transmission System. The device selected maybe a mechanical limit switch, configured so as to be “on” when the motorhas rotated beyond a given point, and so as to be “off” if the motor hasnot rotated beyond that point. Thus information is provided whichspecifies the direction of motor rotation required in order to reach thetrip point. The trip point is preferably chosen to lie approximatelymidway between two adjacent motor index pulses. Thus, after finding thetrip point, the motor can proceed to rotate to an adjacent index pulse,which then provides a precise absolute motor position.

The Operator Interface Subsystem 88 provides the operator with theappropriate control over, and feedback from, preferably all functionalsubsystems of the VersaCam system. In general, each functional subsystemmay require input from the operator, and it may have to prompt theoperator in order to obtain such input. In addition, the operator willrequire feedback from various VersaCam functional subsystems in order toverify that they are programmed as desired, and that they are operatingproperly.

If provided a large number of independent operator I/O devices for theVersaCam system, one could dedicate one input device and one displaydevice to each functional subsystem. The I/O software for eachfunctional subsystem would then be straightforward: it could format theoutput display, and it could write to the display at any time.

As a practical matter, one embodiment of the VersaCam system operateswith one primary display device and one primary input device at a time(although there may also be some secondary devices such as controlswitches and indicator lights). The primary input device may be a keypador a computer keyboard (although it could easily be a touchscreen orother such device). The primary display may be a device that supportsalpha-numeric display, such as a small alpha-numeric LCD display or afull-size computer monitor. Thus the primary input device and theprimary display may be shared by many functional subsystems.

The complexity of sharing the operator I/O devices can be separated fromthe VersaCam functional subsystems by using the concept of “virtual” I/Odevices. Although restricted to a single pair of physical I/O devices,one can implement as many virtual I/O devices as desired by sharing thephysical devices in a well-defined way, such as by separating thedisplay screen into different regions or by allowing only one virtualI/O device at a time to use the physical I/O devices. Regardless of howthe virtual devices are implemented, one can provide dedicated virtualI/O devices to all of the functional subsystems.

The scheme chosen to provide virtual I/O device support is a “windowing”system. In general, each virtual display can be shown in a “window” onthe physical display device. (A given window may or may not be visibleon the screen at any given time.) Operator input is then routed to thefunctional subsystem which “owns” the window in which the visible cursorresides (although certain keys may be dedicated to specific functionalsubsystems). The software subsystem which implements the windowingcapability can support different types of display and input deviceswithout requiring changes to the functional subsystem software.

On a large display screen, it is possible for many or all windows to beshown on the screen simultaneously. On a small screen, it may bepossible to show only the active (input) window. A relatively largewindow may support menu-driven operation. Alternatively, a single-cellwindow may be created for each operator input parameter, resulting in auser interface very similar to a spreadsheet.

To illustrate the flexibility afforded by this approach, consider thefollowing example. It is expected that the Turret Slide TrajectoryDesign Subsystem 80 will operate on both the VersaCam controller, usinga keypad and a small (4×20 characters) alphanumeric display, and on apersonal computer using a standard keyboard and a full-size display.However, the majority of the trajectory design software can run oneither platform with no modification whatsoever. The functionalsubsystem I/O software can be left unchanged using only a 4×20 sectionof the PC screen for the display; only the windowing support softwareneed be changed to support the different hardware platforms. Even if itis desired to make optimal use of each type of display, the functionalsubsystem I/O software can query the windowing support software as tothe size of available windows and then implement the optimal interfacefor that window size, with there still being no modifications requiredto the remainder of the functional subsystem software.

The preferred embodiments herein disclosed are not intended to beexhaustive or to unnecessarily limit the scope of the invention. Thepreferred embodiments were chosen and described in order to explain theprinciples of the present invention so that others skilled in the artmay practice the invention. Having shown and described preferredembodiments of the present invention, those skilled in the art willrealize that many variations and modifications may be made to affect thedescribed invention. Many of those variations and modifications willprovide the same result and fall within the spirit of the claimedinvention. It is the intention, therefore, to limit the invention onlyas indicated by the scope of the claims.

What is claimed is:
 1. A machine tool apparatus comprising: an operatorinterface adapted to allow an operator to specify parameters for aturn-around operation and a feed-in operation, said turn-aroundoperation for computing a trajectory which connects adjacent operations,said feed-in operation for a cutting operation in which a turret toolingis advanced into a feedstock; and a tool slide adapted to move in saidtrajectory, said trajectory including said turn-around operation andsaid feed-in operation; and wherein said feed-in operation uses initialposition, feed-in rate, and final position as parameters.
 2. The machinetool apparatus of claim 1 wherein said operator interface is adapted toenable an operator to program said apparatus by a keyboard at saidapparatus.
 3. The machine tool apparatus of claim 1 wherein saidoperator interface is adapted to enable an operator to program saidapparatus by a touchscreen at said apparatus.
 4. The machine toolapparatus of claim 1 wherein said operator interface includes an outputdisplay.
 5. The machine tool apparatus of claim 1 wherein said feed-inoperation and said turn-around operation are performed within a machinecycle.
 6. A machine tool apparatus comprising: an operator interfaceadapted to allow an operator to specify parameters for a turn-aroundoperation and a dwell operation, said turn-around operation forcomputing a trajectory which connects adjacent operations, said dwelloperation for causing a tool slide to remain in a predetermined positionfor a specific number of spindle revolutions; and said tool slideadapted to move in said trajectory, said trajectory including saidturn-around operation and said dwell operation; and wherein said dwelloperation uses duration as a parameter.
 7. The machine tool apparatus ofclaim 6 wherein said operator interface is adapted to enable an operatorto program said apparatus by a keyboard at said apparatus.
 8. Themachine tool apparatus of claim 6 wherein said operator interface isadapted to enable an operator to program said apparatus by a touchscreenat said apparatus.
 9. The machine tool apparatus of claim 6 wherein saidoperator interface includes an output display.
 10. The machine toolapparatus of claim 6 wherein said dwell operation and said turn-aroundoperation are performed within a machine cycle.
 11. A machine toolapparatus comprising: an operator interface adapted to allow an operatorto specify parameters for a turn-around operation and a feed-outoperation, said turn-around operation for computing a trajectory whichconnects adjacent operations, said feed-out operation for a cuttingoperation in which a turret tooling is retracted out of a feedstock; anda tool slide adapted to move in said trajectory, said trajectoryincluding said turn-around operation and said feed-out operation; andwherein said feed-out operation uses feed-out rate and final position asparameters.
 12. The machine tool apparatus of claim 11 wherein saidoperator interface is adapted to enable an operator to program saidapparatus by a keyboard at said apparatus.
 13. The machine toolapparatus of claim 11 wherein said operator interface is adapted toenable an operator to program said apparatus by a touchscreen at saidapparatus.
 14. The machine tool apparatus of claim 11 wherein saidoperator interface includes an output display.
 15. The machine toolapparatus of claim 11 wherein said feed-out operation and saidturn-around operation are performed within a machine cycle.
 16. Amachine tool apparatus comprising: an operator interface adapted toallow an operator to specify parameters for a turn-around operation,said turn-around operation for computing a trajectory which connectsadjacent operations; and a tool slide adapted to move in saidtrajectory, said trajectory including said turn-around operation;wherein said turn-around operation uses minimum clear position andminimum clear period as parameters.
 17. The machine tool apparatus ofclaim 16 wherein said operator interface is adapted to enable anoperator to program said apparatus by a keyboard at said apparatus. 18.The machine tool apparatus of claim 16 wherein said operator interfaceis adapted to enable an operator to program said apparatus by atouchscreen at said apparatus.
 19. The machine tool apparatus of claim16 wherein said operator interface includes an output display.
 20. Amachine tool apparatus comprising: an operator interface adapted toallow an operator to specify parameters for a turn-around operation anda position operation, said turn-around operation for computing atrajectory which connects adjacent operations, said position operationfor positioning a tool slide in a location for a specified duration; anda tool slide adapted to move in said trajectory, said trajectoryincluding said turn-around operation and said position operation; andwherein said position operation uses final position and duration asparameters.
 21. The machine tool apparatus of claim 20 wherein saidoperator interface is adapted to enable an operator to program saidapparatus by a keyboard at said apparatus.
 22. The machine toolapparatus of claim 20 wherein said operator interface is adapted toenable an operator to program said apparatus by a touchscreen at saidapparatus.
 23. The machine tool apparatus of claim 20 wherein saidoperator interface includes an output display.
 24. The machine toolapparatus of claim 20 wherein said turn-around operation and saidposition operation are performed within a machine cycle.